package day17.feifei.wangyunfei;

import java.io.*;

public class Demo01 {
    public static void main(String[] args) throws IOException {
        File file = new File("C:\\Users\\飞飞\\Desktop\\xjpic.jpg");
        FileOutputStream fos = new FileOutputStream("D:\\file\\io\\a\\xjpic.jpg");
        FileInputStream fis = new FileInputStream(file);
        BufferedInputStream bis = new BufferedInputStream(fis);
        BufferedOutputStream bos = new BufferedOutputStream(fos);

        int read;
        while ((read = fis.read()) != -1) {
            bos.write(read);
        }
        bos.flush();
        bos.close();
        bis.close();
        fis.close();
        fos.close();

    }
}
